#include <iostream>
#include <stack>
#include <cmath>
using namespace std;
#define maxn 101

int A[maxn],B[maxn],d[maxn],n,x,y,z;
int ans=0;
struct Dirt {
	int location;
	int value;
};
stack<Dirt> dirtstack;

inline Dirt make_dirt(int location, int value){
	Dirt temp;
	temp.location=location;
	temp.value=value;
	return temp;
}

int main(){
#ifdef reopen
	freopen("landscaping.in","r",stdin);
	freopen("landscaping.out","w",stdout);
#endif
	cin>>n>>x>>y>>z;
	for(int i=0;i<n;i++){
		cin>>A[i]>>B[i];
	}
	for(int i=0;i<n;i++){
		d[i]=A[i]-B[i];
	}

	for(int i=0;i<n;i++){
		if(A[i]==B[i]) continue;
		if(dirtstack.empty()) dirtstack.push(make_dirt(i,d[i]));
		else{
			if(dirtstack.top().value*d[i]>0) dirtstack.push(make_dirt(i,d[i]));
			else{
				if((d[i]>0 && abs(dirtstack.top().location-i)*z > y) || (d[i]<0 && abs(dirtstack.top().location-i)*z > x)){	//不划算
					while(!dirtstack.empty()){	//全部把栈中元素删光
						if(dirtstack.top().value>0) ans += dirtstack.top().value*y;
						else ans += -dirtstack.top().value*x;
						dirtstack.pop();
					}
					dirtstack.push(make_dirt(i,d[i]));
				}else{
					if(abs(dirtstack.top().value)-abs(d[i]) > 0){
						//能满足需求而且还有剩余
						Dirt ctop = dirtstack.top();
						ctop.value += d[i];
						ans += abs(i-dirtstack.top().location*z*ctop.value);	//改动标记，abs()包含的东西
						dirtstack.pop();
						dirtstack.push(ctop);
					}else if(abs(dirtstack.top().value)-abs(d[i]) == 0){
						//能满足需求且没有剩余
						ans += abs(i-dirtstack.top().location)*z*abs(d[i]);
						dirtstack.pop();
					}else{
						//不能完全满足需求
						int cvalue = d[i];
						while(!dirtstack.empty() && dirtstack.top().value*cvalue < 0){
							if(abs(cvalue) >= abs(dirtstack.top().value)){
								cvalue += dirtstack.top().value;
								ans += abs(i-dirtstack.top().location)*z*abs(dirtstack.top().value);
								dirtstack.pop();
							}else{
								Dirt ctop = dirtstack.top();
								ctop.value += cvalue;
								dirtstack.pop();
								dirtstack.push(ctop);
							}
						}
						dirtstack.push(make_dirt(i,cvalue));
					}
				}
			}
		}
	}
	if(!dirtstack.empty()){
		//栈还有剩余，全部处理光
		//此时栈中所有value必定同号
		if(dirtstack.top().value > 0){
			while(!dirtstack.empty()){
				ans += abs(dirtstack.top().value)*y;
				dirtstack.pop();
			}
		}else{
			while(!dirtstack.empty()){
				ans += abs(dirtstack.top().value)*x;
				dirtstack.pop();
			}
		}
	}
	cout<<ans<<endl;
#ifdef reopen
	fclose(stdin);
	fclose(stdout);
#endif reopen
	return 0;
}
